package principle.lawOfDemeter.origin;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * @author： pang-yun
 * @date： 2021-08-25 13:07
 * 功能目的 ：用于
 */

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Teacher {
    private String name;  //姓名
    private String clazz;  // 班级
    private static List<Student> studentList;   // 学生列表

    static {
         studentList= new ArrayList<Student>();
         studentList.add(new Student("pang",10,555));
         studentList.add(new Student("chao",11,556));
         studentList.add(new Student("jie",12,557));
         studentList.add(new Student("god",1,5555));
    }

    public static List<Student> getStudentList(){
        return studentList;
    }


}
